function plotcloth_plane(array,Restlength)

% Plot the cloth and the plane

% Cloth
tensor=array2tensor(array);
X=tensor(:,:,1);
Y=tensor(:,:,2);
Z=tensor(:,:,3);

hold on
grid on
N=size(X,1);

% Plane
[xplane,yplane]=meshgrid(linspace(-N/2,N/2,N),linspace(-N/2,N/2,N));
Bineq=kron(ones(1,N),linspace(-1,1,N)');

% Plotting
cla
surf(xplane,yplane,Bineq,'FaceColor','none');
surfcloth(X,Y,Z,Restlength);
hold off